<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">

    <title>创建活动</title>
    <meta name="keywords" content="创建活动">
    <meta name="description" content="创建活动">

    <link href="/css/bootstrap.min.css?v=3.4.0" rel="stylesheet">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">

    <link href="/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">
    <link href="/css/plugins/chosen/chosen.css" rel="stylesheet">
    <link href="/css/plugins/switchery/switchery.css" rel="stylesheet">

    <link href="/css/animate.min.css" rel="stylesheet">
    <link href="/css/style.min.css?v=3.0.0" rel="stylesheet">
</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>商户
                        <small>审核，查找</small>
                    </h5>
                </div>

                <div class="ibox-content">

                    <form role="form" class="form-horizontal">
                        <div class="col-sm-12">
                            <div class="row">
                                <div class="form-group">
                                    <label class="col-sm-1 control-label">账户</label>

                                    <div class="col-sm-2">
                                        <input type="text" placeholder="账户" id="account" class="form-control">
                                    </div>

                                    <label class="col-sm-1 control-label">负责人</label>

                                    <div class="col-sm-2">
                                        <input type="text" placeholder="负责人" id="contactPerson" class="form-control">
                                    </div>

                                    <label class="col-sm-1 control-label">状态</label>

                                    <div class="col-sm-2">
                                        <select data-placeholder="请选择商户类型..." name="companyType"
                                                class="chosen-select form-control">
                                            <option value="">请选择商户类型</option>
                                            <option value="110000" hassubinfo="true">未审批商户</option>
                                            <option value="120000" hassubinfo="true">已审批商户</option>
                                        </select>
                                    </div>

                                    <label class="col-sm-1 control-label">商户名称</label>

                                    <div class="col-sm-2">
                                        <input type="text" placeholder="商户名称" id="storeName" class="form-control">
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div class="col-sm-12">
                            <div class="row">
                                <div class="form-group">
                                    <label class="col-sm-1 control-label">手机号</label>

                                    <div class="col-sm-2">
                                        <input type="text" placeholder="手机号" id="cellphoneNumber" class="form-control">
                                    </div>

                                    <label class="col-sm-1 control-label">注册日期</label>

                                    <div class="col-sm-6">
                                        <input onclick="laydate({istime: true, format: 'YYYY-MM-DD hh:mm:ss'})"
                                               placeholder="YYYY-MM-DD hh:mm:ss" class="form-control layer-date">
                                        <input type="checkbox" class="js-switch form-control" checked/>
                                        <small>是否选择日期</small>
                                    </div>

                                    <button type="submit" class="btn btn-primary col-sm-offset-1">
                                        <i class="fa fa-search"></i>
                                        &nbsp;搜索
                                    </button>
                                </div>
                            </div>
                        </div>
                    </form>

                    <br/><br/>
                    <table class="table table-striped table-hover" id="business_user">
                        <thead>
                        <tr>
                            <th>序号</th>
                            <th>头像</th>
                            <th>账户</th>
                            <th>商户名</th>
                            <th>手机号</th>
                            <th>地址</th>
                            <th>注册日期</th>
                            <th>推荐商户</th>
                            <th>状态</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <#list list as business>
                        <tr class="gradeX">
                            <td>${business.id}</td>
                            <td class="client-avatar"><img alt="image" src="/img/a2.jpg"></td>
                            <td>${business.accountName}</td>
                            <td>${business.storeName}</td>
                            <td>${business.cellphoneNumber}</td>
                            <td>${business.storeAddress}</td>
                            <td>${business.user.createDate?string("yyyy-MM-dd HH:mm")}</td>
                            <td class="client-status">
                                <#if business.isStarStore == "Y">
                                    <button class="btn btn-danger btn-xs" type="button">已推荐</button>
                                <#else>
                                    <button class="btn btn-default btn-xs btn-outline" type="button">未推荐</button>
                                </#if>
                            </td>
                            <td>
                                <#if business.status == "5">
                                    <button class="btn btn-primary btn-xs" type="button">已验证</button>
                                <#else>
                                    <button class="btn btn-default btn-xs btn-outline" type="button">等待验证</button>
                                </#if>
                            </td>
                            <td>
                                <div class="btn-group">
                                    <#if business.status == "5">
                                        <button data-toggle="dropdown" class="btn btn-primary btn-xs dropdown-toggle">操作
                                            <span class="caret"></span>
                                        </button>
                                        <ul class="dropdown-menu">
                                            <li><a href="buttons.html#">置顶</a>
                                            </li>
                                            <li><a href="${rc.contextPath}/business/profile?id=${business.id}">查看</a>
                                            </li>
                                            <li><a href="buttons.html#" class="font-bold">编辑</a>
                                            </li>
                                            <li><a href="buttons.html#">注销</a>
                                            </li>
                                            <li class="divider"></li>
                                            <li><a href="buttons.html#">删除</a>
                                            </li>
                                        </ul>
                                    <#else>
                                        <button data-toggle="dropdown" class="btn btn-primary btn-xs dropdown-toggle">操作
                                            <span class="caret"></span>
                                        </button>
                                        <ul class="dropdown-menu">
                                            <li><a href="buttons.html#">置顶</a>
                                            </li>
                                            <li><a href="buttons.html#" class="font-bold">编辑审批</a>
                                            </li>
                                        </ul>
                                    </#if>
                                </div>
                            </td>
                        </tr>
                        </#list>
                        </tbody>
                    </table>

                </div>
            </div>
        </div>
    </div>
</div>

<!-- 全局js -->
<script src="/js/jquery-2.1.1.min.js"></script>
<script src="/js/bootstrap.min.js?v=3.4.0"></script>

<!-- 自定义js -->
<script src="/js/content.min.js?v=1.0.0"></script>


<!-- Data Tables -->
<script src="/js/plugins/dataTables/jquery.dataTables.js"></script>
<script src="/js/plugins/dataTables/dataTables.bootstrap.js"></script>

<!-- Chosen -->
<script src="/js/plugins/chosen/chosen.jquery.js"></script>

<!-- layerDate plugin javascript -->
<script src="/js/plugins/layer/laydate/laydate.js"></script>

<!-- Switchery -->
<script src="/js/plugins/switchery/switchery.js"></script>

<script type="application/javascript">
    $(document).ready(function () {
        /** data table begin */
        $('#business_user').DataTable({
            "order": [[3, "desc"]]
        });
        /** data table end */

        /** Switchery begin */
        var c = document.querySelector(".js-switch");
        var b = new Switchery(c, {color: "#1AB394"});
        /** Switchery end */

        /** chosen select begin */
        var config = {
            ".chosen-select": {},
            ".chosen-select-deselect": {allow_single_deselect: true},
            ".chosen-select-no-single": {disable_search_threshold: 10},
            ".chosen-select-no-results": {no_results_text: "Oops, nothing found!"},
            ".chosen-select-width": {width: "55%"}
        };

        for (var selector in config) {
            $(selector).chosen(config[selector]);
        }
        /** chosen select end */

        /** lay date begin */
        laydate({elem: "#hello", event: "focus"});
        var start = {
            elem: "#start",
            format: "YYYY/MM/DD hh:mm:ss",
            min: laydate.now(),
            max: "2099-06-16 23:59:59",
            istime: true,
            istoday: false,
            choose: function (a) {
                end.min = a;
                end.start = a
            }
        };
        var end = {
            elem: "#end",
            format: "YYYY/MM/DD hh:mm:ss",
            min: laydate.now(),
            max: "2099-06-16 23:59:59",
            istime: true,
            istoday: false,
            choose: function (a) {
                start.max = a
            }
        };
        laydate(start);
        laydate(end);
        /** lay date end */

    });
</script>

</body>

</html>